@extends('admin.public')

@section('content')
    <div class="col-md-12">
        <form data-validate="parsley" method="post">
            {!! csrf_field() !!}
            <section class="panel panel-default">
                <header class="panel-heading">
                    {{ $frame['title'] }}
                    <a href="{{ route('admin.index.help') }}" class="btn btn-xs btn-default pull-right">帮助中心</a>
                </header>
                <div class="panel-body">
                    <p class="text-muted">请慎重书写帮助中心信息内容,以免对用户的使用造成错误的指引!</p>
                    <div class="form-group">
                        <label>帮助信息名称</label>
                        <input type="text" class="form-control parsley-validated" data-required="true" name="name" placeholder="请填写帮助信息标题">
                    </div>
                    <div class="form-group pull-in clearfix">
                        <div class="col-sm-6">
                            <label>信息标签</label>
                            <div class="clearfix"></div>
                            <input name="tag" id="tagsinput_tag" class="tagsinput" type="text"
                                   value="{{ $tag }}"/>
                        </div>
                        <div class="col-sm-6">
                            <label>信息排序</label>
                            <div class="clearfix"></div>
                            <input class="slider slider-horizontal form-control" type="text" value="1"
                                   data-slider-min="1" data-slider-max="100" data-slider-step="1" data-slider-value="1"
                                   data-slider-orientation="horizontal" name="xindex">
                        </div>
                    </div>
                    <div class="form-group">
                        <label>详情</label>
                        <div id="describe" name="describe" type="text/plain" style="width: 100%;height: 300px;"></div>
                    </div>
                </div>
                <footer class="panel-footer text-right bg-light lter">
                    <button type="submit" class="btn btn-success btn-s-xs">保存</button>
                </footer>
            </section>
        </form>
    </div>
@endsection

@section('css')
    <link rel="stylesheet" href="/public/theme/js/slider/slider.css" type="text/css"/>
    <link href="/public/fileinput/css/fileinput.css" media="all" rel="stylesheet" type="text/css"/>
    <link href="/public/fileinput/themes/explorer/theme.css" media="all" rel="stylesheet" type="text/css"/>
    <link rel="stylesheet" href="/public/theme/js/datepicker/datepicker.css" type="text/css"/>

@endsection

@section('js')
    <!-- datepicker -->
    <script src="/public/theme/js/datepicker/bootstrap-datepicker.js"></script>

    <!-- parsley -->
    <script src="/public/theme/js/parsley/parsley.min.js"></script>
    <script src="/public/theme/js/parsley/parsley.extend.js"></script>

    <!-- slider -->
    <script src="/public/theme/js/slider/bootstrap-slider.js"></script>

    <!-- uediter -->
    <script src="/public/laravel-u-editor/ueditor.config.js"></script>
    <script src="/public/laravel-u-editor/ueditor.all.min.js"></script>
    <script src="/public/laravel-u-editor/lang/zh-cn/zh-cn.js"></script>

    <!-- tagsinput -->
    <script src="/public/theme/js/tagsinput/bootstrap-switch.js"></script>
    <script src="/public/theme/js/tagsinput/jquery.tagsinput.js"></script>
    <script src="/public/theme/js/tagsinput/form-component.js"></script>
    <script>
        var uea = UE.getEditor('describe');
    </script>
@endsection